<template>
  <div style="height:100%;width:100%">
    <img :src="url?IMG_ROOT+url:defaultUrl" />
  </div>
</template>
<script>
const IMG_ROOT = process.env.IMG_ROOT;

export default {
  name: "MImg",
  props: {
    url: "",
    defaultUrl: ""
  },
  data() {
    return {
      IMG_ROOT: ""
    };
  },
  created() {
    this.IMG_ROOT = IMG_ROOT;
  }
};
</script>
<style lang="scss" scoped>
img {
  height: 100%;
  width: 100%;
}
</style>